package com.dc.project_kotlin.adapter

import android.view.View
import com.dc.project_kotlin.R
import com.dc.project_kotlin.bean.BannerResponse
import com.dc.project_kotlin.weight.banner.HomeBannerViewHolder
import com.zhpan.bannerview.BaseBannerAdapter

class HomeBannerAdapter: BaseBannerAdapter<BannerResponse, HomeBannerViewHolder>() {

    override fun createViewHolder(itemView: View, viewType: Int): HomeBannerViewHolder {
        return HomeBannerViewHolder(itemView)
    }

    override fun onBind(
        holder: HomeBannerViewHolder,
        data: BannerResponse?,
        position: Int,
        pageSize: Int
    ) {
        holder.bindData(data, position, pageSize)
    }

    override fun getLayoutId(viewType: Int): Int {
        return R.layout.banner_itemhome
    }
}